﻿<?xml version="1.0" encoding="utf-8"?>
<Mapping Space="C-S"
         xmlns="urn:schemas-microsoft-com:windows:storage:mapping:CS">
  <EntityContainerMapping StorageEntityContainer="Schema"
                          CdmEntityContainer="SchemaInformation">
    <EntitySetMapping Name="Tables"
                      StoreEntitySet="STables"
                      TypeName="Store.Table">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="CatalogName"
                      ColumnName="CatalogName" />
      <ScalarProperty Name="SchemaName"
                      ColumnName="SchemaName" />
      <ScalarProperty Name="Name"
                      ColumnName="Name" />
    </EntitySetMapping>

    <EntitySetMapping Name="TableColumns"
                      StoreEntitySet="STableColumns"
                      TypeName="Store.Column">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="Name"
                      ColumnName="Name" />
      <ScalarProperty Name="Ordinal"
                      ColumnName="Ordinal" />
      <ScalarProperty Name="IsNullable"
                      ColumnName="IsNullable" />
      <ComplexProperty Name="ColumnType">
        <ScalarProperty Name="TypeName"
                        ColumnName="TypeName" />
        <ScalarProperty Name="MaxLength"
                        ColumnName="MaxLength" />
        <ScalarProperty Name="DateTimePrecision"
                        ColumnName="DateTimePrecision" />
        <ScalarProperty Name="Precision"
                        ColumnName="Precision" />
        <ScalarProperty Name="Scale"
                        ColumnName="Scale" />
        <ComplexProperty Name="Collation">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CollationCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CollationSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CollationName" />
        </ComplexProperty>
        <ComplexProperty Name="CharacterSet">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CharacterSetCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CharacterSetSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CharacterSetName" />
        </ComplexProperty>
        <ScalarProperty Name="IsMultiSet"
                        ColumnName="IsMultiSet" />
      </ComplexProperty>
      <ScalarProperty Name="IsIdentity"
                      ColumnName="IsIdentity" />
      <ScalarProperty Name="IsStoreGenerated"
                      ColumnName="IsStoreGenerated" />
      <ScalarProperty Name="Default"
                      ColumnName="Default" />
    </EntitySetMapping>

    <EntitySetMapping Name="Views"
                      StoreEntitySet="SViews"
                      TypeName="Store.View">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="CatalogName"
                      ColumnName="CatalogName" />
      <ScalarProperty Name="SchemaName"
                      ColumnName="SchemaName" />
      <ScalarProperty Name="Name"
                      ColumnName="Name" />
      <ScalarProperty Name="ViewDefinition"
                      ColumnName="ViewDefinition" />
      <ScalarProperty Name="IsUpdatable"
                      ColumnName="IsUpdatable" />
    </EntitySetMapping>

    <EntitySetMapping Name="ViewColumns"
                      StoreEntitySet="SViewColumns"
                      TypeName="Store.Column">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="Name"
                      ColumnName="Name" />
      <ScalarProperty Name="Ordinal"
                      ColumnName="Ordinal" />
      <ScalarProperty Name="IsNullable"
                      ColumnName="IsNullable" />
      <ComplexProperty Name="ColumnType">
        <ScalarProperty Name="TypeName"
                        ColumnName="TypeName" />
        <ScalarProperty Name="MaxLength"
                        ColumnName="MaxLength" />
        <ScalarProperty Name="Precision"
                        ColumnName="Precision" />
        <ScalarProperty Name="DateTimePrecision"
                        ColumnName="DateTimePrecision" />
        <ScalarProperty Name="Scale"
                        ColumnName="Scale" />
        <ComplexProperty Name="Collation">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CollationCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CollationSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CollationName" />
        </ComplexProperty>
        <ComplexProperty Name="CharacterSet">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CharacterSetCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CharacterSetSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CharacterSetName" />
        </ComplexProperty>
        <ScalarProperty Name="IsMultiSet"
                        ColumnName="IsMultiSet" />
      </ComplexProperty>
      <ScalarProperty Name="IsIdentity"
                      ColumnName="IsIdentity" />
      <ScalarProperty Name="IsStoreGenerated"
                      ColumnName="IsStoreGenerated" />
      <ScalarProperty Name="Default"
                      ColumnName="Default" />
    </EntitySetMapping>

    <EntitySetMapping Name="Functions">
      <EntityTypeMapping TypeName="IsTypeOf(Store.Function)">
        <MappingFragment StoreEntitySet="SFunctions">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <ScalarProperty Name="CatalogName"
                          ColumnName="CatalogName" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="SchemaName" />
          <ScalarProperty Name="Name"
                          ColumnName="Name" />
          <ScalarProperty Name="IsBuiltIn"
                          ColumnName="IsBuiltIn" />
          <ScalarProperty Name="IsNiladic"
                          ColumnName="IsNiladic" />
        </MappingFragment>
      </EntityTypeMapping>
      <EntityTypeMapping TypeName="Store.ScalarFunction">
        <MappingFragment StoreEntitySet="SFunctions">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <ScalarProperty Name="IsAggregate"
                          ColumnName="IsAggregate" />
          <ComplexProperty Name="ReturnType">
            <ScalarProperty Name="TypeName"
                            ColumnName="ReturnTypeName" />
            <ScalarProperty Name="MaxLength"
                            ColumnName="ReturnMaxLength" />
            <ScalarProperty Name="Precision"
                            ColumnName="ReturnPrecision" />
            <ScalarProperty Name="DateTimePrecision"
                            ColumnName="ReturnDateTimePrecision" />
            <ScalarProperty Name="Scale"
                            ColumnName="ReturnScale" />
            <ComplexProperty Name="Collation">
              <ScalarProperty Name="CatalogName"
                              ColumnName="ReturnCollationCatalog" />
              <ScalarProperty Name="SchemaName"
                              ColumnName="ReturnCollationSchema" />
              <ScalarProperty Name="Name"
                              ColumnName="ReturnCollationName" />
            </ComplexProperty>
            <ComplexProperty Name="CharacterSet">
              <ScalarProperty Name="CatalogName"
                              ColumnName="ReturnCharacterSetCatalog" />
              <ScalarProperty Name="SchemaName"
                              ColumnName="ReturnCharacterSetSchema" />
              <ScalarProperty Name="Name"
                              ColumnName="ReturnCharacterSetName" />
            </ComplexProperty>
            <ScalarProperty Name="IsMultiSet"
                            ColumnName="ReturnIsMultiSet" />
          </ComplexProperty>
          <Condition ColumnName="IsTvf"
                     Value="false"/>
        </MappingFragment>
      </EntityTypeMapping>
      <EntityTypeMapping TypeName="Store.TableValuedFunction">
        <MappingFragment StoreEntitySet="SFunctions">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <Condition ColumnName="IsTvf"
                     Value="true"/>
        </MappingFragment>
      </EntityTypeMapping>
    </EntitySetMapping>

    <EntitySetMapping Name="FunctionParameters"
                      TypeName="Store.Parameter"
                      StoreEntitySet="SFunctionParameters">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="Name"
                      ColumnName="Name" />
      <ScalarProperty Name="Ordinal"
                      ColumnName="Ordinal" />
      <ComplexProperty Name="ParameterType">
        <ScalarProperty Name="TypeName"
                        ColumnName="TypeName" />
        <ScalarProperty Name="MaxLength"
                        ColumnName="MaxLength" />
        <ScalarProperty Name="DateTimePrecision"
                        ColumnName="DateTimePrecision" />
        <ScalarProperty Name="Precision"
                        ColumnName="Precision" />
        <ScalarProperty Name="Scale"
                        ColumnName="Scale" />
        <ComplexProperty Name="Collation">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CollationCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CollationSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CollationName" />
        </ComplexProperty>
        <ComplexProperty Name="CharacterSet">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CharacterSetCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CharacterSetSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CharacterSetName" />
        </ComplexProperty>
        <ScalarProperty Name="IsMultiSet"
                        ColumnName="IsMultiSet" />
      </ComplexProperty>
      <ScalarProperty Name="Mode"
                      ColumnName="Mode" />
      <ScalarProperty Name="Default"
                      ColumnName="Default" />
    </EntitySetMapping>

    <EntitySetMapping Name="FunctionReturnTableColumns"
                      StoreEntitySet="SFunctionReturnTableColumns"
                      TypeName="Store.FunctionReturnTableColumn">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="Name"
                      ColumnName="Name" />
      <ScalarProperty Name="Ordinal"
                      ColumnName="Ordinal" />
      <ScalarProperty Name="IsNullable"
                      ColumnName="IsNullable" />
      <ComplexProperty Name="ColumnType">
        <ScalarProperty Name="TypeName"
                        ColumnName="TypeName" />
        <ScalarProperty Name="MaxLength"
                        ColumnName="MaxLength" />
        <ScalarProperty Name="DateTimePrecision"
                        ColumnName="DateTimePrecision" />
        <ScalarProperty Name="Precision"
                        ColumnName="Precision" />
        <ScalarProperty Name="Scale"
                        ColumnName="Scale" />
        <ComplexProperty Name="Collation">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CollationCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CollationSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CollationName" />
        </ComplexProperty>
        <ComplexProperty Name="CharacterSet">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CharacterSetCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CharacterSetSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CharacterSetName" />
        </ComplexProperty>
        <ScalarProperty Name="IsMultiSet"
                        ColumnName="IsMultiSet" />
      </ComplexProperty>
      <ScalarProperty Name="IsIdentity"
                      ColumnName="IsIdentity" />
      <ScalarProperty Name="IsStoreGenerated"
                      ColumnName="IsStoreGenerated" />
      <ScalarProperty Name="Default"
                      ColumnName="Default" />
    </EntitySetMapping>

    <EntitySetMapping Name="Procedures"
                      TypeName="Store.Procedure"
                      StoreEntitySet="SProcedures">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="CatalogName"
                      ColumnName="CatalogName" />
      <ScalarProperty Name="SchemaName"
                      ColumnName="SchemaName" />
      <ScalarProperty Name="Name"
                      ColumnName="Name" />
    </EntitySetMapping>

    <EntitySetMapping Name="ProcedureParameters"
                      TypeName="Store.Parameter"
                      StoreEntitySet="SProcedureParameters">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="Name"
                      ColumnName="Name" />
      <ScalarProperty Name="Ordinal"
                      ColumnName="Ordinal" />
      <ComplexProperty Name="ParameterType">
        <ScalarProperty Name="TypeName"
                        ColumnName="TypeName" />
        <ScalarProperty Name="MaxLength"
                        ColumnName="MaxLength" />
        <ScalarProperty Name="DateTimePrecision"
                        ColumnName="DateTimePrecision" />
        <ScalarProperty Name="Precision"
                        ColumnName="Precision" />
        <ScalarProperty Name="Scale"
                        ColumnName="Scale" />
        <ComplexProperty Name="Collation">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CollationCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CollationSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CollationName" />
        </ComplexProperty>
        <ComplexProperty Name="CharacterSet">
          <ScalarProperty Name="CatalogName"
                          ColumnName="CharacterSetCatalog" />
          <ScalarProperty Name="SchemaName"
                          ColumnName="CharacterSetSchema" />
          <ScalarProperty Name="Name"
                          ColumnName="CharacterSetName" />
        </ComplexProperty>
        <ScalarProperty Name="IsMultiSet"
                        ColumnName="IsMultiSet" />
      </ComplexProperty>
      <ScalarProperty Name="Mode"
                      ColumnName="Mode" />
      <ScalarProperty Name="Default"
                      ColumnName="Default" />
    </EntitySetMapping>

    <EntitySetMapping Name="TableConstraints" >
      <EntityTypeMapping TypeName="IsTypeOf(Store.Constraint)">
        <MappingFragment StoreEntitySet="SConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <ScalarProperty Name="Name"
                          ColumnName="Name" />
          <ScalarProperty Name="IsDeferrable"
                          ColumnName="IsDeferrable" />
          <ScalarProperty Name="IsInitiallyDeferred"
                          ColumnName="IsInitiallyDeferred" />
        </MappingFragment>
      </EntityTypeMapping>
      <EntityTypeMapping TypeName="Store.UniqueConstraint">
        <MappingFragment StoreEntitySet="SConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <Condition ColumnName="ConstraintType"
                     Value="UNIQUE"/>
        </MappingFragment>
      </EntityTypeMapping>
      <EntityTypeMapping TypeName="Store.CheckConstraint">
        <MappingFragment StoreEntitySet="SConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <Condition ColumnName="ConstraintType"
                     Value="CHECK"/>
        </MappingFragment>
        <MappingFragment StoreEntitySet="SCheckConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <ScalarProperty Name="Expression"
                          ColumnName="Expression" />
        </MappingFragment>
      </EntityTypeMapping>
      <EntityTypeMapping TypeName="Store.PrimaryKeyConstraint">
        <MappingFragment StoreEntitySet="SConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <Condition ColumnName="ConstraintType"
                     Value="PRIMARY KEY"/>
        </MappingFragment>
      </EntityTypeMapping>
      <EntityTypeMapping TypeName="Store.ForeignKeyConstraint">
        <MappingFragment StoreEntitySet="SConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <Condition ColumnName="ConstraintType"
                     Value="FOREIGN KEY"/>
        </MappingFragment>
        <MappingFragment StoreEntitySet="SForeignKeyConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <ScalarProperty Name="UpdateRule"
                          ColumnName="UpdateRule" />
          <ScalarProperty Name="DeleteRule"
                          ColumnName="DeleteRule" />
        </MappingFragment>
      </EntityTypeMapping>
    </EntitySetMapping>

    <EntitySetMapping Name="ViewConstraints" >
      <EntityTypeMapping TypeName="Store.UniqueConstraint" >
        <MappingFragment StoreEntitySet="SViewConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <ScalarProperty Name="Name"
                          ColumnName="Name" />
          <ScalarProperty Name="IsDeferrable"
                          ColumnName="IsDeferrable" />
          <ScalarProperty Name="IsInitiallyDeferred"
                          ColumnName="IsInitiallyDeferred" />
          <Condition ColumnName="ConstraintType"
                     Value="UNIQUE"/>
        </MappingFragment>
      </EntityTypeMapping>
      <EntityTypeMapping TypeName="Store.CheckConstraint" >
        <MappingFragment StoreEntitySet="SViewConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <ScalarProperty Name="Name"
                          ColumnName="Name" />
          <ScalarProperty Name="IsDeferrable"
                          ColumnName="IsDeferrable" />
          <ScalarProperty Name="IsInitiallyDeferred"
                          ColumnName="IsInitiallyDeferred" />
          <ScalarProperty Name="Expression"
                          ColumnName="Expression" />
          <Condition ColumnName="ConstraintType"
                     Value="CHECK"/>
        </MappingFragment>
      </EntityTypeMapping>
      <EntityTypeMapping TypeName="Store.PrimaryKeyConstraint" >
        <MappingFragment StoreEntitySet="SViewConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <ScalarProperty Name="Name"
                          ColumnName="Name" />
          <ScalarProperty Name="IsDeferrable"
                          ColumnName="IsDeferrable" />
          <ScalarProperty Name="IsInitiallyDeferred"
                          ColumnName="IsInitiallyDeferred" />
          <Condition ColumnName="ConstraintType"
                     Value="PRIMARY KEY"/>
        </MappingFragment>
      </EntityTypeMapping>
      <EntityTypeMapping TypeName="Store.ForeignKeyConstraint" >
        <MappingFragment StoreEntitySet="SViewConstraints">
          <ScalarProperty Name="Id"
                          ColumnName="Id" />
          <ScalarProperty Name="Name"
                          ColumnName="Name" />
          <ScalarProperty Name="IsDeferrable"
                          ColumnName="IsDeferrable" />
          <ScalarProperty Name="IsInitiallyDeferred"
                          ColumnName="IsInitiallyDeferred" />
          <ScalarProperty Name="UpdateRule"
                          ColumnName="UpdateRule" />
          <ScalarProperty Name="DeleteRule"
                          ColumnName="DeleteRule" />
          <Condition ColumnName="ConstraintType"
                     Value="FOREIGN KEY"/>
        </MappingFragment>
      </EntityTypeMapping>
    </EntitySetMapping>

    <EntitySetMapping Name="TableForeignKeys"
                      StoreEntitySet="SForeignKeys"
                      TypeName="Store.ForeignKey">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="Ordinal"
                      ColumnName="Ordinal" />
    </EntitySetMapping>

    <EntitySetMapping Name="ViewForeignKeys"
                      StoreEntitySet="SViewForeignKeys"
                      TypeName="Store.ForeignKey">
      <ScalarProperty Name="Id"
                      ColumnName="Id" />
      <ScalarProperty Name="Ordinal"
                      ColumnName="Ordinal" />
    </EntitySetMapping>

    <AssociationSetMapping Name="TableTableColumns"
                           StoreEntitySet="STableColumns"
                           TypeName="Store.TableOrViewColumn">
      <EndProperty Name="Parent">
        <ScalarProperty Name="Id"
                        ColumnName="ParentId" />
      </EndProperty>
      <EndProperty Name="Column">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
      <!--Condition ColumnName="ParentId" IsNull="false"/-->
    </AssociationSetMapping>

    <AssociationSetMapping Name="ViewViewColumns"
                           StoreEntitySet="SViewColumns"
                           TypeName="Store.TableOrViewColumn">
      <EndProperty Name="Parent">
        <ScalarProperty Name="Id"
                        ColumnName="ParentId" />
      </EndProperty>
      <EndProperty Name="Column">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="TableTableConstraints"
                           StoreEntitySet="SConstraints"
                           TypeName="Store.TableOrViewConstraint">
      <EndProperty Name="Parent">
        <ScalarProperty Name="Id"
                        ColumnName="ParentId" />
      </EndProperty>
      <EndProperty Name="Constraint">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="TableConstraintColumns"
                           StoreEntitySet="SConstraintColumns"
                           TypeName="Store.TableOrViewConstraintColumn">
      <EndProperty Name="Constraint">
        <ScalarProperty Name="Id"
                        ColumnName="ConstraintId" />
      </EndProperty>
      <EndProperty Name="Column">
        <ScalarProperty Name="Id"
                        ColumnName="ColumnId" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="TableConstraintForeignKeys"
                           StoreEntitySet="SForeignKeys"
                           TypeName="Store.ConstraintForeignKey">
      <EndProperty Name="Constraint">
        <ScalarProperty Name="Id"
                        ColumnName="ConstraintId" />
      </EndProperty>
      <EndProperty Name="ForeignKey">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="ToTableForeignKeyColumns"
                           StoreEntitySet="SForeignKeys"
                           TypeName="Store.ToForeignKeyColumn">
      <EndProperty Name="ForeignKey">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
      <EndProperty Name="Column">
        <ScalarProperty Name="Id"
                        ColumnName="ToColumnId" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="FromTableForeignKeyColumns"
                           StoreEntitySet="SForeignKeys"
                           TypeName="Store.FromForeignKeyColumn">
      <EndProperty Name="ForeignKey">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
      <EndProperty Name="Column">
        <ScalarProperty Name="Id"
                        ColumnName="FromColumnId" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="ViewViewConstraints"
                           StoreEntitySet="SViewConstraints"
                           TypeName="Store.TableOrViewConstraint">
      <EndProperty Name="Parent">
        <ScalarProperty Name="Id"
                        ColumnName="ParentId" />
      </EndProperty>
      <EndProperty Name="Constraint">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="ViewConstraintColumns"
                           StoreEntitySet="SViewConstraintColumns"
                           TypeName="Store.TableOrViewConstraintColumn">
      <EndProperty Name="Constraint">
        <ScalarProperty Name="Id"
                        ColumnName="ConstraintId" />
      </EndProperty>
      <EndProperty Name="Column">
        <ScalarProperty Name="Id"
                        ColumnName="ColumnId" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="ViewConstraintForeignKeys"
                           StoreEntitySet="SViewForeignKeys"
                           TypeName="Store.ConstraintForeignKey">
      <EndProperty Name="Constraint">
        <ScalarProperty Name="Id"
                        ColumnName="ConstraintId" />
      </EndProperty>
      <EndProperty Name="ForeignKey">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="ToViewForeignKeyColumns"
                           StoreEntitySet="SViewForeignKeys"
                           TypeName="Store.ToForeignKeyColumn">
      <EndProperty Name="ForeignKey">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
      <EndProperty Name="Column">
        <ScalarProperty Name="Id"
                        ColumnName="ToColumnId" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="FromViewForeignKeyColumns"
                           StoreEntitySet="SViewForeignKeys"
                           TypeName="Store.FromForeignKeyColumn">
      <EndProperty Name="ForeignKey">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
      <EndProperty Name="Column">
        <ScalarProperty Name="Id"
                        ColumnName="FromColumnId" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="FunctionFunctionParameters"
                           StoreEntitySet="SFunctionParameters"
                           TypeName="Store.RoutineParameter">
      <EndProperty Name="Routine">
        <ScalarProperty Name="Id"
                        ColumnName="ParentId" />
      </EndProperty>
      <EndProperty Name="Parameter">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="FunctionFunctionReturnTableColumns"
                           StoreEntitySet="SFunctionReturnTableColumns"
                           TypeName="Store.FunctionFunctionReturnTableColumn">
      <EndProperty Name="Function">
        <ScalarProperty Name="Id"
                        ColumnName="ParentId" />
      </EndProperty>
      <EndProperty Name="Column">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
    </AssociationSetMapping>

    <AssociationSetMapping Name="ProcedureProcedureParameters"
                           StoreEntitySet="SProcedureParameters"
                           TypeName="Store.RoutineParameter">
      <EndProperty Name="Routine">
        <ScalarProperty Name="Id"
                        ColumnName="ParentId" />
      </EndProperty>
      <EndProperty Name="Parameter">
        <ScalarProperty Name="Id"
                        ColumnName="Id" />
      </EndProperty>
    </AssociationSetMapping>
  </EntityContainerMapping>
</Mapping>